package com.chushouya.order.constants;


import com.general.framework.core.enums.IEnum;
import com.general.framework.core.lang.Strings;

import java.util.Objects;

public enum AlipayFinishAllDeliveryEnum implements IEnum<Long> {
    GENERATED_LOGISTICS_ORDER(0L, "已生成物流单"),
    COURIER_HAS_PICKED_UP(1L, "快递小哥已取件");



    private Long value;

    private String desc;

    AlipayFinishAllDeliveryEnum(Long value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String getDesc(Long status) {
        for (AlipayFinishAllDeliveryEnum thisEnum : AlipayFinishAllDeliveryEnum.values()) {
            if (Objects.equals(thisEnum.value, status)) {
                return thisEnum.desc;
            }
        }
        return Strings.EMPTY;
    }
    public Long getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    @Override
    public Long value() {
        return this.value;
    }

    @Override
    public String named() {
        return this.desc;
    }
}
